package com.chen.convert;


import com.chen.pojo.DeptDO;
import com.chen.vo.dept.DeptCreateReqVO;
import com.chen.vo.dept.DeptRespVO;
import com.chen.vo.dept.DeptUpdateReqVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ClassName: DeptConvert
 * Package: com.chen.convert
 * Description:
 *
 * @Author 陈俊辉
 * @Create 2024/4/11 10:44
 * @Version 1.0
 */
@Mapper
public interface DeptConvert {

   DeptConvert INSTANCE= Mappers.getMapper(DeptConvert.class);

   /**
    * 将deptDO转化成响应格式deptRespVO
    * @param deptDO
    * @return
    */
   DeptRespVO convert(DeptDO deptDO);

   /**
    * 将deptDO列表转化成响应格式deptRespVO
    * @param deptDOList
    * @return
    */
   List<DeptRespVO> convertList01(List<DeptDO> deptDOList);

   /**
    * 将创建的请求参数转化成数据实体类DO
    * @param reqVO
    * @return
    */
   DeptDO convert01(DeptCreateReqVO reqVO);
   /**
    * 将更新的请求参数转化成数据实体类DO
    * @param reqVO
    * @return
    */
   DeptDO convert01(DeptUpdateReqVO reqVO);
}
